application: new 'insert action group' private api
authorRyan Lortie <desrt@desrt.ca>
Wed, 15 Jan 2014 06:21:29 +0000 (01:21 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sat, 18 Jan 2014 03:40:50 +0000 (22:40 -0500)
Add a new private API to GtkApplication akin to
gtk_widget_insert_action_group().

We'll use this to insert a few extra actions at the app level with a
separate namespace for the special items in the Mac OS application menu.

https://bugzilla.gnome.org/show_bug.cgi?id=720552

gtk/gtkapplication.c
gtk/gtkapplicationprivate.h

index 5e55b8c961df6e8e09ad4a05e70b1e5fdc95fd7f..61035b595b1b5581b260406c25d5fc9614b73616 100644 (file)
@@ -1545,6 +1545,14 @@ gtk_application_get_action_muxer (GtkApplication *application)
   return application->priv->muxer;
 }
 
+void
+gtk_application_insert_action_group (GtkApplication *application,
+                                     const gchar    *name,
+                                     GActionGroup   *action_group)
+{
+  gtk_action_muxer_insert (application->priv->muxer, name, action_group);
+}
+
 void
 gtk_application_handle_window_realize (GtkApplication *application,
                                        GtkWindow      *window)
index 7847fcfb22ce77e17a1ca03cc89d09b3a2e598d0..3ba26d5c17923eee29b115cbf84308d62822c98a 100644 (file)
@@ -53,6 +53,10 @@ void                    gtk_application_foreach_accel_keys              (GtkAppl
                                                                          gpointer                  user_data);
 G_GNUC_INTERNAL
 GtkActionMuxer *        gtk_application_get_action_muxer                (GtkApplication           *application);
+G_GNUC_INTERNAL
+void                    gtk_application_insert_action_group             (GtkApplication           *application,
+                                                                         const gchar              *name,
+                                                                         GActionGroup             *action_group);
 
 
 #define GTK_TYPE_APPLICATION_IMPL                           (gtk_application_impl_get_type ())